package com.atguigu.statisticsservice;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@EnableSwagger2
@EnableFeignClients //开启feign服务
@EnableDiscoveryClient //开启nacos服务发现
@EnableTransactionManagement
@ComponentScan(basePackages = {"com.atguigu"})//加载需要的配置类路径 设置包扫描的规则
@MapperScan("com.atguigu.statisticsservice.mapper") //扫描指定mapper位置
@EnableScheduling   //启动定时任务
public class StatisticsApplication {

    public static void main(String[] args) {
        SpringApplication.run(StatisticsApplication.class, args);
    }
}
